package app.fugema.shop.main.evaluate.adapter;

import android.view.View;

import com.base.common.view.adapter.ada.GeneralRecyclerAdapter;
import com.base.common.view.adapter.connector.BaseItemMultiType;
import com.base.common.view.adapter.connector.BaseUniversalItemMultiType;


import app.fugema.shop.R;
import app.fugema.shop.databinding.ItemQuestionAnwserContentBinding;
import app.fugema.shop.databinding.ItemQuestionListHeaderViewBinding;
import app.fugema.shop.main.evaluate.model.QusetionHeadBean;
import app.fugema.shop.main.evaluate.model.UserAnswerBean;

public class QuestionAnswerAdapter extends GeneralRecyclerAdapter {
    @Override
    public void initMultiItemType()
    {
        //商品信息
        putMultiItemType(new BaseItemMultiType<QusetionHeadBean, ItemQuestionListHeaderViewBinding>()
        {
            @Override
            public int getLayoutId()
            {
                return R.layout.item_question_list_header_view;
            }

            @Override
            public int getItemViewType()
            {
                return BaseItemMultiType.TYPE_HEAD;
            }

            @Override
            public void onBindViewHolder(ItemQuestionListHeaderViewBinding binding, int position, QusetionHeadBean bean)
            {
                super.onBindViewHolder(binding, position, bean);
                binding.tvQuestionCount.setVisibility(View.GONE);
            }
        });
        //问题
        putMultiItemType(new BaseUniversalItemMultiType<QusetionHeadBean>(R.layout.item_answer_list_header_tag){

        });
        // 回答内容
        putMultiItemType(new BaseItemMultiType<UserAnswerBean, ItemQuestionAnwserContentBinding>()
        {
            @Override
            public int getLayoutId()
            {
                return R.layout.item_question_anwser_content;
            }

            @Override
            public void onBindViewHolder(ItemQuestionAnwserContentBinding binding, int position, UserAnswerBean bean)
            {
                super.onBindViewHolder(binding, position, bean);
            }
        });
    }
}
